#include <msp430.h> 
#include "ADC12.h"

/**
 * main.c
 */
void Clock_init()
{
  unsigned char i;
  BCSCTL1&=~XT2OFF;
  BCSCTL2|=SELM1+SELS;
  do
  {
    IFG1&=~OFIFG;
    for(i=0;i<100;i++)
      _NOP();
   }
  while((IFG1&OFIFG)!=0);
  IFG1&=~OFIFG;
}
unsigned int result0,result1,result2,result3;
void main(void)
{
	WDTCTL = WDTPW | WDTHOLD;	// stop watchdog timer
	Clock_init();
	ADC12_LIST_init(0);
	ADC12CTL0 |= ADC12SC;
	while(1);
}

#pragma vector=ADC12_VECTOR
__interrupt void ADC12ISR(void)
{
  result0=ADC12MEM0;
  result1=ADC12MEM1;
  result2=ADC12MEM2;
  result3=ADC12MEM3;
}
